<div id="map">
	<span class='title'>修改分类</span>
</div>
<div id="content">
<script type="text/javascript">
	var url="<?php echo $this->createUrl('category/addcate') ?>";
	var pid="<?php echo $category->pid; ?>";
</script>





<?php  $form=$this->beginWidget('CActiveForm',
	array('enableClientValidation' => true, 'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
        )
        ); ?>
<table class="table table-striped table-bordered">
	<tr class='form-group'>
		<th width="20%">名称</th>
		<th>值</th>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'pid') ?></td>
		<td>
		<select name="Category[pid]" id="pid">

		<option value="0">顶级分类</option>
		<?php 
		if(!empty($data)){
			foreach($data as $v){
		 ?>

		<option value="<?php echo $v['cid'] ?>"><?php echo $v['html'].$v['cname']?></option>

		<?php }} ?>

		</select>
		</td>
		<td><?php echo $form->error($category,'pid') ?></td>
	</tr>



	<tr>
		<td><?php echo $form->labelEx($category,'cname') ?></td>
		<td>
		<?php echo $form->textField($category,'cname') ?>
		</td>
		<td><?php echo $form->error($category,'cname') ?></td>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'title') ?></td>
		<td>
		<?php echo $form->textarea($category,'title',array('style'=>'resize:none')) ?>

		</td>
		<td><?php echo $form->error($category,'title') ?></td>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'keywords') ?></td>
		<td><?php echo $form->textarea($category,'keywords',array('style'=>'resize:none')) ?></td>
		<td><?php echo $form->error($category,'keywords') ?></td>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'description') ?></td>
		<td><?php echo $form->textarea($category,'description',array('style'=>'resize:none')) ?></td>
		<td><?php echo $form->error($category,'description') ?></td>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'sort') ?></td>
		<td><?php echo $form->textField($category,'sort') ?></td>
		<td><?php echo $form->error($category,'sort') ?></td>
	</tr>
	<tr>
		<td><?php echo $form->labelEx($category,'display') ?></td>
		<td>
		<input type="radio" name="Category[display]" value="1" checked="checked">显示
		<input type="radio" name="Category[display]" value="0">隐藏
		</td>
		<td><?php echo $form->error($category,'display') ?></td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" id="sub" value="提交" class="btn btn-primary btn-default"></td>
	</tr>


<?php $this->endWidget() ?>
</table>
</div>

</body>
</html>